@extends('adminlte::page')

@section('title', '新闻发布')

@section('content_header')

@stop
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
@section('content')
    <form action="{{ route('test') }}" method="post">
        {{ csrf_field() }}
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">子页面内容管理</h3>
        </div>

            <input type="hidden" name="channel_id" value="{{$channel_id}}">

            <div class="box-body">

                <div class="form-group">
                    <label>子页面内容</label>
                    <textarea name="content" class="textarea" id="my-editor" cols="30" rows="10">{{ $detail->content or '' }}</textarea>
                    <script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
                    <script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
                    <script>
                        var options = {
                            filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
                            filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=',
                            filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
                            filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token='
                        };
                        // $('textarea').ckeditor();
                        $('.textarea').ckeditor(options); // if class is prefered.
                    </script>
                </div>

            </div>

            <div class="box-footer">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>


        <script src="/vendor/laravel-filemanager/js/lfm.js"></script>

        <script>
            $('#lfm').filemanager('image');
        </script>
    </div>
    </form>

@stop